home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000036_donews!crash!w….std.com!cosell_Thu, 10 Feb 94 01:37:24 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
4KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1sib@bkhouse.cts.com>; Thu, 10 Feb 94 01:37:24 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pURgr-0001o1C; Wed, 9 Feb 94 22:03 EST
Received: from news.std.com by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pURd0-00002kC; Wed, 9 Feb 94 18:59 PST
Received: from world.std.com by news.std.com (5.65c/Spike-2.1)
id AA21700; Wed, 9 Feb 1994 21:59:40 -0500
Received: by world.std.com (5.65c/Spike-2.0)
id AA14360; Wed, 9 Feb 1994 21:59:38 -0500
X-Mailer: //\\miga Electronic Mail (AmiElm 2.253)
Content-Length: 775
Date: Wednesday, 9 February 1994 21:23 EST
Organization: Fantasy Farm Fibers
Message-Id: <5883:77010@fantasyfarm.com>
From: bernie@fantasyfarm.com (Bernie Cosell)
To: AmigaE@bkhouse.cts.com
Subject: Bugs in the Mod() function
After a lot of debugging of code that ought to have worked, I
discovered that the Mod function seems to be VERY broken. As we
[ought to] all know, taking an integer mod N should *always* get you
an integer between 0 and n-1. Well, it ain't so in E. A simple
test reveals:
Modulo: Mod(11,8) = 3
Modulo: Mod(6,8) = 6
Modulo: Mod(1,8) = 1
Modulo: Mod(-4,8) = -4
Modulo: Mod(-9,8) = -1
Modulo: Mod(-14,8) = -6
Which is clearly broken. In the course of pursuing this, I discovered
that simple division ain't a prize, either:
Dividing 11 / 8 = 1
Dividing 6 / 8 = 0
Dividing 1 / 8 = 0
Dividing -4 / 8 = 0
Dividing -9 / 8 = -1
Dividing -14 / 8 = -1
It is astounding to me to try to understand arithmetic in an environment
where:
(A - B) / B does *NOT* equal (A / B) - 1
/Bernie\
--
Bernie Cosell bernie@fantasyfarm.com
Fantasy Farm Fibers, Pearisburg, VA (703) 921-2358
From donews!crash!freenet.carleton.ca!ao443 Thu, 10 Feb 94 01:38:13 PST
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1sj8@bkhouse.cts.com>; Thu, 10 Feb 94 01:38:13 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pUSeI-0001w2C; Wed, 9 Feb 94 23:05 EST
Received: from freenet-news.carleton.ca by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pUSSt-00008HC; Wed, 9 Feb 94 19:53 PST
Received: from freenet.carleton.ca by freenet-news.carleton.ca (4.1/SMI-4.0)
id AA26817; Wed, 9 Feb 94 22:53:38 EST
Received: from localhost (ao443@localhost) by freenet.carleton.ca (8.6.4/8.6.4) id WAA17369; Wed, 9 Feb 1994 22:53:04 -0500
Date: Wed, 9 Feb 1994 22:53:04 -0500
Message-Id: <199402100353.WAA17369@freenet.carleton.ca>
Reply-To: ao443@freenet.carleton.ca
From: ao443@freenet.carleton.ca (Jason Maskell)
To: amigae@bkhouse.cts.com
Subject: Some stuff..
Well, some announcements, etc..
I have just uploaded Eformat 1.4 to aminet after having
ferretted out the machine guruing bug. It was Eformat. (I wasn't
initializing the stack pointer.. duh.) So, to fix it, I switched to the
stack code in the E source archive. Now works like a charm, again. The
reason I even saw the bug is because the nested case stuff wasn't working
on some WouterCode, when fixing that, I noticed the stack problem. My
apologies to the person who reported the bug. My fault!
Also, H2e is almost complete and should be up within the week. It
works fine so far, but does not do the following:
- any code!
- global/extern variables
- string constants
- Other goodies
--
'You see son, if this were Star Trek, we'd be negotiating with this Kobold.'
- Unknown Angband Player